home *** CD-ROM | disk | FTP | other *** search
/ Asobe! Fotoshock 5.0 ERO / Asobe! Fotoshock 5.0 ERO.iso / pc / tool.dxr / 00020_KeyDownForTools.ls < prev    next >
Encoding:
Text File  |  1999-03-23  |  2.2 KB  |  86 lines

  1. property dist
  2. global gkeydownbehaviorfortools
  3.  
  4. on beginSprite me
  5.   set gkeydownbehaviorfortools to me
  6.   set the keyDownScript to "keyCheck(gKeyDownBehaviorForTools)"
  7. end
  8.  
  9. on keycheck me
  10.   case the keyCode of
  11.     123:
  12.       if the shiftDown then
  13.         set dist to point(-10, 0)
  14.       else
  15.         set dist to point(-1, 0)
  16.       end if
  17.       movebykey()
  18.     124:
  19.       if the shiftDown then
  20.         set dist to point(10, 0)
  21.       else
  22.         set dist to point(1, 0)
  23.       end if
  24.       movebykey()
  25.     126:
  26.       if the shiftDown then
  27.         set dist to point(0, -10)
  28.       else
  29.         set dist to point(0, -1)
  30.       end if
  31.       movebykey()
  32.     125:
  33.       if the shiftDown then
  34.         set dist to point(0, 10)
  35.       else
  36.         set dist to point(0, 1)
  37.       end if
  38.       movebykey()
  39.     36, 76:
  40.       rgbinput()
  41.   end case
  42. end
  43.  
  44. on movebykey me
  45.   tell getAt(the windowList, 1)
  46.     repeat with n = 1 to 120
  47.       if the ink of sprite n = 33 then
  48.         if the mode of getAt(the scriptInstanceList of sprite n, 1) = #tits then
  49.           alert("テ‡ツアテ‡テε英テ…[テ営テ‡テ陛ャテ†テ‡ツゥテ‡テセテ‡窶ケテ‡テセテ‡テ津③")
  50.         else
  51.           set the loc of sprite n to the loc of sprite n + dist
  52.         end if
  53.         next repeat
  54.       end if
  55.     end repeat
  56.   end tell
  57. end
  58.  
  59. on rgbinput me
  60.   set rvalue to value(the text of field member "RedValue")
  61.   set gvalue to value(the text of field member "GrnValue")
  62.   set bvalue to value(the text of field member "BluValue")
  63.   if (rvalue < 0) or (rvalue > 100) then
  64.     alert("0テ‡ツゥテ‡テ100テ‡窶ケテ‡ツシテ‡テεェテ†テェテョテ‡ツ敕ャツクテウテ陛‡ツオテ‡ニ津「ナ テ‡ナステ‡ツ「テ③")
  65.     set the text of field member "RedValue" to string(100)
  66.     set rvalue to 100
  67.   end if
  68.   if (gvalue < 0) or (gvalue > 100) then
  69.     alert("0テ‡ツゥテ‡テ100テ‡窶ケテ‡ツシテ‡テεェテ†テェテョテ‡ツ敕ャツクテウテ陛‡ツオテ‡ニ津「ナ テ‡ナステ‡ツ「テ③")
  70.     set the text of field member "GrnValue" to string(100)
  71.     set gvalue to 100
  72.   end if
  73.   if (bvalue < 0) or (bvalue > 100) then
  74.     alert("0テ‡ツゥテ‡テ100テ‡窶ケテ‡ツシテ‡テεェテ†テェテョテ‡ツ敕ャツクテウテ陛‡ツオテ‡ニ津「ナ テ‡ナステ‡ツ「テ③")
  75.     set the text of field member "BluValue" to string(100)
  76.     set bvalue to 100
  77.   end if
  78.   sendSprite(12, #setSlider, rvalue)
  79.   sendSprite(15, #setSlider, gvalue)
  80.   sendSprite(18, #setSlider, bvalue)
  81. end
  82.  
  83. on endSprite me
  84.   set the keyDownScript to "nothing"
  85. end
  86.